package phapp.model.system;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 角色与菜单对应, ts_role_menu 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class TsRoleMenu extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;
   
   //columns START
   /**dataId*/
   private java.lang.Integer dataId;
   /**roleId*/
   private java.lang.Integer roleId;
   /**funcId*/
   private java.lang.Integer funcId;
   /**dataStatus*/
   private java.lang.Integer dataStatus;
   /**dataDesc*/
   private java.lang.String dataDesc;
   /**createDate*/
   private java.sql.Timestamp createDate;
   /**updateDate*/
   private java.sql.Timestamp updateDate;
   
   private java.util.ArrayList idList;
   //columns END

	public TsRoleMenu(){
	}

	public TsRoleMenu(
		java.lang.Integer dataId
	){
		this.dataId = dataId;
	}

   public void setDataId(java.lang.Integer value) {
      this.dataId = value;
   }
   
   public java.lang.Integer getDataId() {
      return this.dataId;
   }

   public void setId(java.lang.Integer dataId) {
	      this.dataId = dataId;
	}
	
	public java.lang.Integer getId() {
	      return this.dataId;
	}
   
   public void setRoleId(java.lang.Integer value) {
      this.roleId = value;
   }
   
   public java.lang.Integer getRoleId() {
      return this.roleId;
   }
   public void setFuncId(java.lang.Integer value) {
      this.funcId = value;
   }
   
   public java.lang.Integer getFuncId() {
      return this.funcId;
   }
   public void setDataStatus(java.lang.Integer value) {
      this.dataStatus = value;
   }
   
   public java.lang.Integer getDataStatus() {
      return this.dataStatus;
   }
   public void setDataDesc(java.lang.String value) {
      this.dataDesc = value;
   }
   
   public java.lang.String getDataDesc() {
      return this.dataDesc;
   }
   public String getCreateDateString() {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }
   
   public void setCreateDateString(String value) {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE,java.sql.Timestamp.class));
   }
   
   public void setCreateDate(java.sql.Timestamp value) {
      this.createDate = value;
   }
   
   public java.sql.Timestamp getCreateDate() {
      return this.createDate;
   }
   public String getUpdateDateString() {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }
   
   public void setUpdateDateString(String value) {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE,java.sql.Timestamp.class));
   }
   
   public void setUpdateDate(java.sql.Timestamp value) {
      this.updateDate = value;
   }
   
   public java.sql.Timestamp getUpdateDate() {
      return this.updateDate;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("DataId",getDataId())
         .append("RoleId",getRoleId())
         .append("FuncId",getFuncId())
         .append("DataStatus",getDataStatus())
         .append("DataDesc",getDataDesc())
         .append("CreateDate",getCreateDate())
         .append("UpdateDate",getUpdateDate())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getDataId())
         .append(getRoleId())
         .append(getFuncId())
         .append(getDataStatus())
         .append(getDataDesc())
         .append(getCreateDate())
         .append(getUpdateDate())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof TsRoleMenu == false) return false;
      if(this == obj) return true;
      TsRoleMenu other = (TsRoleMenu)obj;
      return new EqualsBuilder()
         .append(getDataId(),other.getDataId())
         .append(getRoleId(),other.getRoleId())
         .append(getFuncId(),other.getFuncId())
         .append(getDataStatus(),other.getDataStatus())
         .append(getDataDesc(),other.getDataDesc())
         .append(getCreateDate(),other.getCreateDate())
         .append(getUpdateDate(),other.getUpdateDate())
         .isEquals();
   }
}

